package com.aternity.vbd.collect;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Daniel Orr
 */
@Component
public class VbdCollector {

    @Autowired
    private DdlManager ddlManager;

    public void assertSettings() {
        ddlManager.createTablesIfNecessary();
    }

//    @Scheduled(fixedRate = 5*60*1000)
    public void periodicDataCollection() {
        System.out.println("aggg");
    }


    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-vbd.xml");
        VbdCollector vbdCollector = applicationContext.getBean(VbdCollector.class);
        vbdCollector.assertSettings();
    }
}
